package com.csdemos.algs.function;

public class LinearResearch implements ResearchFunction{
    
    protected HashFunction hashFunction;

    public LinearResearch(HashFunction hashFunction) {
        this.hashFunction = hashFunction;
    }
    
    @Override
    public int next(int key, int i){
        return (hashFunction.hash(key) + i) % m;
    }
    
}
